home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Vk
/
VkOutline.z
/
VkOutline
Wrap
Text File
|
1998-10-20
|
16KB
|
463 lines
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
NNNNAAAAMMMMEEEE
VkOutline - A simple outliner
IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
VkComponent : VkCallbackObject
HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
#include <Vk/VkOutline.h>
PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
VkOutline (const char *name, Widget parent);
virtual void ~VkOutline(void);
PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
void reset(void);
AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
Widget listWidget(void);
AAAAddddddddiiiinnnngggg eeeelllleeeemmmmeeeennnnttttssss
void add(char* parent, char* child);
void addChildren(char** parentPath, char** children);
void addChildren(char** parentPath, char** children,
char** keys,
void** childrenHooks);
void createPath(char** names, char** keys);
DDDDiiiissssppppllllaaaayyyyiiiinnnngggg
void displayAll(void);
void displayAsKeyword(char** path);
void highlight(char** items, int attrIndex);
void highlight(int itemPos, int attrIndex);
void unhighlight(int attrIndex);
AAAAttttttttrrrriiiibbbbuuuutttteeee sssseeeettttttttiiiinnnngggg
void setIndentationWidth(int width);
void setKeywordAttributes(Pixel fg, Pixel bg,
PPPPaaaaggggeeee 1111
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
XmFontList font);
int setHighlightAttributes(Pixel fg, Pixel bg,
XmFontList font);
TTTToooogggggggglllliiiinnnngggg
void closePath(char** path);
int effectOfLastToggle(int& from, int& count);
int isPathClosed(char** path);
virtual void toggleChildren(int position);
UUUUttttiiiilllliiiittttyyyy
void getHookAt(int position);
void printTree(void);
void select(int itemPos);
void walkAllKeywords(void* data, void (func*) (void*, VkOlNode*));
CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The VkOutline class provides an ability to display a tree of strings in
an outline fashion. Each string is displayed in a line with an
indentation proportional to its depth in the tree. Each non-leaf string
has a control icon displayed to its left. The control icon denotes
whether the sub-tree under the string is displayed (open) or not
(closed). Control icons can be left-clicked by users to toggle between
open and closed states.
You can build the tree of strings using the add methods, which accept
names of parent and children). Some add methods allow you to provide an
additional string for display only, while the name is used for searching
purpose. Some add methods allow you to associate a user-defined data
pointer (hook) with the children. Note that you can display more than one
tree in the outline. You can treat some strings as "keywords" and
display them with a different set of attributes (foreground, background,
font). You can create (up to 4) different display resource ids (by giving
foreground, background, font) and use them to display a subset of strings
in the tree.
VkOutline uses VkList to do the actual display.
FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee(((())))
PPPPaaaaggggeeee 2222
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
VkOutline(const char* name, Widget parent);
Instantiate a VkOutline object given its name and a widget to act as
its parent.
~~~~VVVVkkkkOOOOuuuuttttlllliiiinnnneeee(((())))
virtual void ~VkOutline(void);
Destroy a VkOutline object.
rrrreeeesssseeeetttt(((())))
void reset(void);
Re-initialize the object. Destroys trees built so far. Retains any
display resources created.
lllliiiissssttttWWWWiiiiddddggggeeeetttt(((())))
Widget listWidget(void);
Provide a handle to the underlying VkList widget used for display.
aaaadddddddd(((())))
void add(char* parent, char* child);
Add a parent-child relation to the tree.
aaaaddddddddCCCChhhhiiiillllddddrrrreeeennnn(((())))
void addChildren(char** path, char** children);
Add several children under the given path. Noop if path does not
exist. char* tables should be terminated by NULL pointers.
aaaaddddddddCCCChhhhiiiillllddddrrrreeeennnn(((())))
void addChildren(char** path, char** display_names,
char** children,
void* hooks);
Add several children under the given path. Names of children
displayed are taken from display_names, their corresponding search
names are taken from children and their corresponding user defined
data (hooks) are taken from hooks. All pointer tables are to be
followed by a NULL pointer and should be of same size. No op if path
does not exist.
PPPPaaaaggggeeee 3333
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
ccccrrrreeeeaaaatttteeeePPPPaaaatttthhhh(((())))
void createPath(char** display_names, char** path);
Create or extend a given path. If path does not exist then a new
tree is created with first element in path as the root. Otherwise if
a partial match is found in the existing set of trees by treating
the first element in the path as the root, then the rest of the
elements in the path are used to extend the path. No op if complete
match is found. Display names are used when fresh strings are added
to the tree.
pppprrrriiiinnnnttttTTTTrrrreeeeeeee(((())))
void printTree(void);
Prints all the trees to stdout.
ttttoooogggggggglllleeeeCCCChhhhiiiillllddddrrrreeeennnn(((())))
virtual void toggleChildren(int position);
Given the position of the item in the outline display, the subtree
under that position is closed if already open or opened if already
closed.
ddddiiiissssppppllllaaaayyyyAAAAllllllll(((())))
void displayAll(void);
All trees in the outline are redisplayed with the default
attributes.
sssseeeettttIIIInnnnddddeeeennnnttttaaaattttiiiioooonnnnWWWWiiiiddddtttthhhh(((())))
void setIndentationWidth(int width);
Sets indentation width for future displays. Indentation width gives
the number of pixels which a child string will be right offset from
its parent.
sssseeeettttKKKKeeeeyyyywwwwoooorrrrddddAAAAttttttttrrrriiiibbbbuuuutttteeeessss(((())))
void setKeywordAttributes(Pixel fg,
Pixel bg,
XmFontList font);
Set display attributes for strings treated as keywords.
sssseeeettttHHHHiiiigggghhhhlllliiiigggghhhhttttAAAAttttttttrrrriiiibbbbuuuutttteeeessss(((())))
PPPPaaaaggggeeee 4444
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
int setHighlightAttributes(Pixel fg,
Pixel bg,
Pixel scrollbar_bg,
XmFontList font);
Create a display resource given a set of display parameters. Returns
an id which you can use in highlight methods. You can create up to 4
resource ids.
ddddiiiissssppppllllaaaayyyyAAAAssssKKKKeeeeyyyywwwwoooorrrrdddd(((())))
void displayAsKeyword(char** path);
Treats the string at the end of given path as a keyword and whenever
it is displayed the parameters set using the setKeywordAttributes
methods are used.
hhhhiiiigggghhhhlllliiiigggghhhhtttt(((())))
void highlight(char** children, int id);
All children nodes if found will be displayed with the resources
associated with the given resource id.
hhhhiiiigggghhhhlllliiiigggghhhhtttt(((())))
void highlight(int item, int id);
The node at the given position if valid will be displayed with the
resources associated with the given resource id.
uuuunnnnhhhhiiiigggghhhhlllliiiigggghhhhtttt(((())))
void unhighlight(int id);
All strings displayed using the given resource id is displayed with
default resources.
ggggeeeettttHHHHooooooookkkkAAAAtttt(((())))
void getHookAt(int position);
Get the user defined data associated with string in the given
display position.
cccclllloooosssseeeePPPPaaaatttthhhh(((())))
void closePath(char** path);
PPPPaaaaggggeeee 5555
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
Given the path of a string (last item in the path), close the sub-
tree under the string.
iiiissssPPPPaaaatttthhhhCCCClllloooosssseeeedddd(((())))
int isPathClosed(char** path);
Given the path of a string (last item in the path), test whether
sub-tree under the string is closed. Returns 1 if closed.
eeeeffffffffeeeeccccttttOOOOffffLLLLaaaassssttttTTTToooogggggggglllleeee(((())))
int effectOfLastToggle(int& position, int& count);
A toggle operation inserts or deletes a set of contiguous strings
from the outline display. This method returns the position and the
extent (count) of insertion (return value 1) or deletion (return
value 0) done as a result of most recent toggle operation on the
outline (by user or by program).
sssseeeelllleeeecccctttt(((())))
void select(int itemPos);
Select (in the XmList sense) the string displayed at the given
position
wwwwaaaallllkkkkAAAAllllllllKKKKeeeeyyyywwwwoooorrrrddddssss(((())))
void walkAllKeywords(void* data, void (*func) (void*, VkOlNode*))
Traverses all the strings displayed as keywords to invoke the
function func. func is passed two arguments - the first argument is
the data that is passed to walkAllKeywords and the second argument
is the pointer to the object (of type VkOlNode) which represents an
outline item treated as a keyword. See VkOlNode for accessing
information about the outline item.
iiiinnnniiiitttt(((())))
void init(void);
Initialization of outline object. All trees created so far are lost.
IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
setDefaultResources(), getResources(), manage(), unmanage(),
baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
PPPPaaaaggggeeee 6666
VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx)))) VVVVkkkkOOOOuuuuttttlllliiiinnnneeee((((3333xxxx))))
IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
SSSSEEEEEEEE AAAALLLLSSSSOOOO
VkComponent, VkCallbackObject
_V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
_T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
_T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
_T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
PPPPaaaaggggeeee 7777